From: Florian Müllner Date: Thu, 29 Jun 2017 22:06:53 +0000 (+0200) Subject: st: Don't try to create shadow for empty texture X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~281 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d1c71fd00d82b517da439a36ce86ca403c645fa2;p=gnome-shell.git st: Don't try to create shadow for empty texture Even though the API documentation doesn't say so, the underlying Cogl texture of a ClutterTexture may be unset, so check for that case to avoid a runtime warning. https://bugzilla.gnome.org/show_bug.cgi?id=784353 --- diff --git a/src/st/st-private.c b/src/st/st-private.c index b00a2bdd7..0db257aa2 100644 --- a/src/st/st-private.c +++ b/src/st/st-private.c @@ -420,7 +420,8 @@ _st_create_shadow_pipeline_from_actor (StShadow *shadow_spec, CoglTexture *texture; texture = clutter_texture_get_cogl_texture (CLUTTER_TEXTURE (actor)); - shadow_pipeline = _st_create_shadow_pipeline (shadow_spec, texture); + if (texture) + shadow_pipeline = _st_create_shadow_pipeline (shadow_spec, texture); } else {